#include <Render/Include/MeshDX11.h>

using namespace Render;

// ========== INTERNAL METHODS ========== //

MeshDX11::MeshDX11(ID3D11Buffer* vertex_buffer, unsigned int vertex_size_stride, unsigned int vertex_offset, ID3D11Buffer* index_buffer, unsigned int index_count, D3D_PRIMITIVE_TOPOLOGY primitive_type)
{
    this->vertex_buffer = vertex_buffer;
    this->vertex_size_stride = vertex_size_stride;
    this->vertex_offset = vertex_offset;
    this->index_buffer = index_buffer;
    this->index_count = index_count;
    this->primitive_type = primitive_type;
}

MeshDX11::~MeshDX11(void)
{
    this->vertex_buffer->Release();
    this->index_buffer->Release();    
}

ID3D11Buffer* MeshDX11::getVertexBuffer()
{
    return this->vertex_buffer;
}

unsigned int MeshDX11::getVertexSizeStride()
{
    return this->vertex_size_stride;
}

unsigned int MeshDX11::getVertexOffset()
{
    return this->vertex_offset;
}

ID3D11Buffer* MeshDX11::getIndexBuffer()
{
    return this->index_buffer;
}

unsigned int MeshDX11::getIndexCount()
{
    return this->index_count;
}

D3D_PRIMITIVE_TOPOLOGY MeshDX11::getPrimitiveType()
{
    return this->primitive_type;
}
